From: Christoph Egger Date: Thu, 17 May 2012 13:45:43 +0000 (+0100) Subject: libxl: fix build on platforms where openpty's parameters are not const. X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~8437 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/%22bookmarks://%22/%22http:/www.example.com/cgi/%22https:/%22bookmarks:/%22?a=commitdiff_plain;h=8aae4f14458bf771a696d8d36b87069718447017;p=xen.git libxl: fix build on platforms where openpty's parameters are not const. Such as NetBSD. Fixes this build error: libxl_aoutils.c: In function 'libxl__openptys': libxl_aoutils.c:281:13: error: passing argument 4 of 'openpty' discards qualifiers from pointer target type /usr/include/util.h:92:6: note: expected 'struct termios *' but argument is of type 'const struct termios *' libxl_aoutils.c:281:13: error: passing argument 5 of 'openpty' discards qualifiers from pointer target type /usr/include/util.h:92:6: note: expected 'struct winsize *' but argument is of type 'const struct winsize *' Signed-off-by: Christoph Egger Acked-by: Roger Pau Monne Acked-by: Ian Campbell Committed-by: Ian Campbell --- diff --git a/tools/libxl/libxl_aoutils.c b/tools/libxl/libxl_aoutils.c index 91e34dea95..ee0df57ff5 100644 --- a/tools/libxl/libxl_aoutils.c +++ b/tools/libxl/libxl_aoutils.c @@ -230,8 +230,8 @@ static void openpty_exited(libxl__egc *egc, libxl__ev_child *child, } int libxl__openptys(libxl__openpty_state *op, - const struct termios *termp, - const struct winsize *winp) { + struct termios *termp, + struct winsize *winp) { /* * This is completely crazy. openpty calls grantpt which the spec * says may fork, and may not be called with a SIGCHLD handler. diff --git a/tools/libxl/libxl_internal.h b/tools/libxl/libxl_internal.h index 73b991524e..85da15562e 100644 --- a/tools/libxl/libxl_internal.h +++ b/tools/libxl/libxl_internal.h @@ -1740,8 +1740,8 @@ struct libxl__openpty_result { }; int libxl__openptys(libxl__openpty_state *op, - const struct termios *termp, - const struct winsize *winp); + struct termios *termp, + struct winsize *winp); /*----- bootloader -----*/